
export function wps_linux_init(tagID, w, h) {
    let iframe;
    let obj = null;
    iframe = document.getElementById(tagID);
    if (iframe.innerHTML.indexOf("application/x-wps") > -1) {
        iframe.innerHTML = "";
    }

    let codes = [];
    codes.push("<object  name='webwps' id='webwps_id' type='application/x-wps' uistyle='ribbon'  width='100%'  height='100%'> <param name='Enabled' value='1' />  </object>");
    iframe.innerHTML = codes.join("");
    obj = document.getElementById("webwps_id");
    window.onbeforeunload = function () {
        obj.Application.Quit();
    };

    return obj;
}